<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <meta http-equiv="X-UA-Compatible" content="ie=edge" />
        <title>Document</title>
        <script src="../vue.js"></script>
        <style>
            .wj-enter-active,
            .wj-leave-active {
                transition: opacity 0.5s;
            }
            .wj-enter,
            .wj-leave-to {
                opacity: 0;
            }
        </style>
    </head>
    <body>
        <div id="app">
            <transition name="wj">
                <p v-if="show">hello</p>
            </transition>
            <button @click="show = !show">按钮</button>
        </div>
        <script>
            let vm = new Vue({
                el: '#app',
                data() {
                    return {
                        show: true,
                    };
                },
                methods: {},
            });
        </script>
    </body>
</html>
